package cn.wolfcode.rbac.mapper;

import cn.wolfcode.rbac.domain.Role;
import cn.wolfcode.rbac.query.QueryObject;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper extends BaseMapper<Role> {
    Role selectByPrimaryKey(Long id);

    int selectForCount(QueryObject qo);

    List<Role> selectForList(QueryObject qo);

    void deleteRoleAndPermissionRelation(Long id);

    void insertRoleAndPermissionRelation(@Param("roleId") Long roleId, @Param("permissionId") Long permissionId);
}